<style scoped>


</style>

<template>

  <div class="p-2 flex justify-between bg-black/10" v-show="!isHome">
    <img class="w-1/2" src="@/assets/logo.png" />
    <img src="@/assets/logo.svg" width="30" height="30" />
  </div>


  <nav class="py-2 fixed bottom-0 w-full flex justify-around text-center bg-black/50 text-white">
    <router-link class="" active-class="text-red-600 font-semibold" :to="{name:'home'}">主页</router-link>
    <router-link active-class="text-red-600 font-semibold" :to="{name:'product'}">产品</router-link>
    <router-link active-class="text-red-600 font-semibold" :to="{name:'news'}">新闻</router-link>
    <router-link active-class="text-red-600 font-semibold" :to="{name:'about'}">关于</router-link>
  </nav>
  

  <div :class="{'p-2':!isHome}">
    <RouterView />
  </div>

  <MyFooter></MyFooter>

</template>

<script setup>
import {onUpdated, computed, ref} from "vue"
import usePageinfoStore from "@/stores/pageinfo"
const pageinfoStore = usePageinfoStore();

// 判断是否是主页
const isHome = computed(()=>{
  return pageinfoStore.routeName=='home';
});

</script>